package itpenguin.entities;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

@PersistenceCapable(detachable="true")
public class ImageSrc {

	public ImageSrc(Article article, String originalSrc) {
		this.originalSrc = originalSrc;
		this.article = article;
	}
	
	public String getOriginalSrc() {
		return originalSrc;
	}
	public String getRemoteSrc() {
		return remoteSrc;
	}
	public void setRemoteSrc(String remoteSrc) {
		this.remoteSrc = remoteSrc;
	}
	
	@Persistent
	private Article article;
	
	public Article getArticle() {
		return article;
	}

	public void setArticle(Article article) {
		this.article = article;
	}

	public void setOriginalSrc(String originalSrc) {
		this.originalSrc = originalSrc;
	}

	@Persistent
	private String originalSrc;
	
	@Persistent
	private String remoteSrc;
	
	@PrimaryKey     
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)     
	private Key key;

	public Key getKey() {
		return key;
	}

	public void setKey(Key key) {
		this.key = key;
	}
	
}
